<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="keywords" content="co'sblog,yoyocjh,yoyohui,chenjunhui,yoyohuiblog,coblog,陈俊辉">
  <meta name="description" content="co'sblog,yoyocjh,yoyohui,chenjunhui,yoyohuiblog,coblog,陈俊辉">
  <meta name="baidu-site-verification" content="kESPwLTu5v" />
  
  <meta http-equiv="X-UA-Compatible" content="IE=edge" >
  <title>H5性能优化 | Co&#39;s Blog</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="H5性能优化转自http://isux.tencent.com/h5-performance.html概述    1.PC优化手段在Mobile侧同样适用    2.在Mobile侧我们提出三秒种渲染完成首屏指标    3.基于第二点，首屏加载3秒完成或使用Loading    4.基于联通3G网络平均338KB/s(2.71Mb/s)，所以首屏资源不应超过1014KB    5.Mobile侧因">
<meta property="og:type" content="article">
<meta property="og:title" content="H5性能优化">
<meta property="og:url" content="http://yoursite.com/2016/07/26/test/index.html">
<meta property="og:site_name" content="Co's Blog">
<meta property="og:description" content="H5性能优化转自http://isux.tencent.com/h5-performance.html概述    1.PC优化手段在Mobile侧同样适用    2.在Mobile侧我们提出三秒种渲染完成首屏指标    3.基于第二点，首屏加载3秒完成或使用Loading    4.基于联通3G网络平均338KB/s(2.71Mb/s)，所以首屏资源不应超过1014KB    5.Mobile侧因">
<meta property="og:image" content="http://7xp39h.com1.z0.glb.clouddn.com/h5%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96.png">
<meta property="og:updated_time" content="2016-07-26T03:13:22.461Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="H5性能优化">
<meta name="twitter:description" content="H5性能优化转自http://isux.tencent.com/h5-performance.html概述    1.PC优化手段在Mobile侧同样适用    2.在Mobile侧我们提出三秒种渲染完成首屏指标    3.基于第二点，首屏加载3秒完成或使用Loading    4.基于联通3G网络平均338KB/s(2.71Mb/s)，所以首屏资源不应超过1014KB    5.Mobile侧因">
<meta name="twitter:image" content="http://7xp39h.com1.z0.glb.clouddn.com/h5%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96.png">
  
    <link rel="alternative" href="/atom.xml" title="Co&#39;s Blog" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.ico">
  
  <link rel="stylesheet" href="/css/style.css">

<script type="text/javascript">
  (function(){
      var bp = document.createElement('script');
      var curProtocol = window.location.protocol.split(':')[0];
      if (curProtocol === 'https') {
          bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
      }
      else {
          bp.src = 'http://push.zhanzhang.baidu.com/push.js';
      }
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(bp, s);
  })();
</script>



</head>

<body>
  <div id="container">
    <div class="left-col">
    <div class="overlay"></div>
<div class="intrude-less">
	<header id="header" class="inner">
		<a href="/" class="profilepic">
			
			<img lazy-src="http://7xp39h.com1.z0.glb.clouddn.com/166403689660643642.jpg" class="js-avatar">
			
		</a>

		<hgroup>
		  <h1 class="header-author"><a href="/">Co Chan</a></h1>
		</hgroup>

		
		<p class="header-subtitle">n(*≧▽≦*)n</p>
		

		
			<div class="switch-btn">
				<div class="icon">
					<div class="icon-ctn">
						<div class="icon-wrap icon-house" data-idx="0">
							<div class="birdhouse"></div>
							<div class="birdhouse_holes"></div>
						</div>
						<div class="icon-wrap icon-ribbon hide" data-idx="1">
							<div class="ribbon"></div>
						</div>
						
						<div class="icon-wrap icon-link hide" data-idx="2">
							<div class="loopback_l"></div>
							<div class="loopback_r"></div>
						</div>
						
						
						<div class="icon-wrap icon-me hide" data-idx="3">
							<div class="user"></div>
							<div class="shoulder"></div>
						</div>
						
					</div>
					
				</div>
				<div class="tips-box hide">
					<div class="tips-arrow"></div>
					<ul class="tips-inner">
						<li>Menu</li>
						<li>Tags</li>
						
						<li>Links</li>
						
						
						<li>Über</li>
						
					</ul>
				</div>
			</div>
		

		<div class="switch-area">
			<div class="switch-wrap">
				<section class="switch-part switch-part1">
					<nav class="header-menu">
						<ul>
						
							<li><a href="/">主页</a></li>
				        
							<li><a href="/archives">所有文章</a></li>
				        
						</ul>
					</nav>
					<nav class="header-nav">
						<div class="social">
							
								<a class="github" target="_blank" href="https://github.com/channnn/channnn.github.io" title="github">github</a>
					        
								<a class="weibo" target="_blank" href="#" title="weibo">weibo</a>
					        
								<a class="mail" target="_blank" href="/" title="mail">mail</a>
					        
								<a class="rss" target="_blank" href="#" title="rss">rss</a>
					        
						</div>
					</nav>
				</section>
				
				
				<section class="switch-part switch-part2">
					<div class="widget tagcloud" id="js-tagcloud">
						<a href="/tags/canvas/" style="font-size: 10px;">canvas</a> <a href="/tags/性能优化/" style="font-size: 10px;">性能优化</a>
					</div>
				</section>
				
				
				
				<section class="switch-part switch-part3">
					<div id="js-friends">
					
			          <a target="_blank" class="main-nav-link switch-friends-link" href="http://www.yoyocjh.com/">我的博客</a>
			        
			        </div>
				</section>
				

				
				
				<section class="switch-part switch-part4">
				
					<div id="js-aboutme">我就是我，是颜色不一样的吃货…</div>
				</section>
				
			</div>
		</div>
	</header>				
</div>

    </div>
    <div class="mid-col">
      <nav id="mobile-nav">
  	<div class="overlay">
  		<div class="slider-trigger"></div>
  		<h1 class="header-author js-mobile-header hide">Co Chan</h1>
  	</div>
	<div class="intrude-less">
		<header id="header" class="inner">
			<div class="profilepic">
			
				<img lazy-src="http://7xp39h.com1.z0.glb.clouddn.com/166403689660643642.jpg" class="js-avatar">
			
			</div>
			<hgroup>
			  <h1 class="header-author">Co Chan</h1>
			</hgroup>
			
			<p class="header-subtitle">n(*≧▽≦*)n</p>
			
			<nav class="header-menu">
				<ul>
				
					<li><a href="/">主页</a></li>
		        
					<li><a href="/archives">所有文章</a></li>
		        
		        <div class="clearfix"></div>
				</ul>
			</nav>
			<nav class="header-nav">
				<div class="social">
					
						<a class="github" target="_blank" href="https://github.com/channnn/channnn.github.io" title="github">github</a>
			        
						<a class="weibo" target="_blank" href="#" title="weibo">weibo</a>
			        
						<a class="mail" target="_blank" href="/" title="mail">mail</a>
			        
						<a class="rss" target="_blank" href="#" title="rss">rss</a>
			        
				</div>
			</nav>
		</header>				
	</div>
</nav>

      <div class="body-wrap"><article id="post-test" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/2016/07/26/test/" class="article-date">
  	<time datetime="2016-07-26T02:48:14.000Z" itemprop="datePublished">2016-07-26</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      H5性能优化
    </h1>
  

      </header>
      
      <div class="article-info article-info-post">
        
	<div class="article-tag tagcloud">
		<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/性能优化/">性能优化</a></li></ul>
	</div>

        

        <div class="clearfix"></div>
      </div>
      
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="H5性能优化"><a href="#H5性能优化" class="headerlink" title="H5性能优化"></a>H5性能优化</h1><p>转自<a href="http://isux.tencent.com/h5-performance.html" target="_blank" rel="external">http://isux.tencent.com/h5-performance.html</a><br>概述<br>    1.PC优化手段在Mobile侧同样适用<br>    2.在Mobile侧我们提出三秒种渲染完成首屏指标<br>    3.基于第二点，首屏加载3秒完成或使用Loading<br>    4.基于联通3G网络平均338KB/s(2.71Mb/s)，所以首屏资源不应超过1014KB<br>    5.Mobile侧因手机配置原因，除加载外渲染速度也是优化重点<br>    6.基于第五点，要合理处理代码减少渲染损耗<br>    7.基于第二、第五点，所有影响首屏加载和渲染的代码应在处理逻辑中后置<br>    8.加载完成后用户交互使用时也需注意性能</p>
<a id="more"></a>
<p><img src="http://7xp39h.com1.z0.glb.clouddn.com/h5%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96.png" alt="pic"></p>

      
    </div>
    
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2016/07/29/canvas/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption"><</strong>
      <div class="article-nav-title">
        
          canvas
        
      </div>
    </a>
  
  
</nav>

  
</article>


<div class="share_jia">
	<!-- JiaThis Button BEGIN -->
	<div class="jiathis_style">
		<span class="jiathis_txt">Share to: &nbsp; </span>
		<a class="jiathis_button_facebook"></a> 
    <a class="jiathis_button_twitter"></a>
    <a class="jiathis_button_plus"></a> 
    <a class="jiathis_button_tsina"></a>
		<a class="jiathis_button_cqq"></a>
		<a class="jiathis_button_douban"></a>
		<a class="jiathis_button_weixin"></a>
		<a class="jiathis_button_tumblr"></a>
    <a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
	</div>
	<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=1405949716054953" charset="utf-8"></script>
	<!-- JiaThis Button END -->
</div>






<div class="duoshuo">
	<!-- 多说评论框 start -->
	<div class="ds-thread" data-thread-key="test" data-title="H5性能优化" data-url="http://yoursite.com/2016/07/26/test/"></div>
	<!-- 多说评论框 end -->
	<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
	<script type="text/javascript">
	var duoshuoQuery = {short_name:"true"};
	(function() {
		var ds = document.createElement('script');
		ds.type = 'text/javascript';ds.async = true;
		ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
		ds.charset = 'UTF-8';
		(document.getElementsByTagName('head')[0] 
		 || document.getElementsByTagName('body')[0]).appendChild(ds);
	})();
	</script>
	<!-- 多说公共JS代码 end -->
</div>




</div>
      <footer id="footer">
  <div class="outer">
    <div id="footer-info">
    	<div class="footer-left">
    		&copy; 2016 Co Chan
    	</div>

    </div>
  </div>
</footer>

    </div>
    
  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">


<script>
	var yiliaConfig = {
		fancybox: true,
		mathjax: true,
		animate: true,
		isHome: false,
		isPost: true,
		isArchive: false,
		isTag: false,
		isCategory: false,
		open_in_new: false
	}
</script>
<script src="http://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js"></script>
<script src="/js/main.js"></script>






<script type="text/x-mathjax-config">
MathJax.Hub.Config({
    tex2jax: {
        inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
        processEscapes: true,
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
    }
});

MathJax.Hub.Queue(function() {
    var all = MathJax.Hub.getAllJax(), i;
    for(i=0; i < all.length; i += 1) {
        all[i].SourceElement().parentNode.className += ' has-jax';                 
    }       
});
</script>

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


  </div>
</body>
</html>